﻿using System;
using EasyStep.TestExecution.Data;
using EasyStep.TestExecution.Interfaces;
using OpenQA.Selenium;
using EasyStep.Attributes;



namespace EasyStep.TestActions.Actions.Click
{
    [TestAction(typeof(Click), Name = "ByClassName", RequireData = false)]
    class ClickByClassName : ITestAction<IWebDriver>
    {
        public void Execute(IWebDriver browser, TestStepResult data, IExecuteDataContext context)
        {
            browser.FindElement(By.ClassName(data.Locator)).Click();            
        }
    }
}